<?php

use App\Task\CalcRedbillRankingTask;
use App\Task\ClearExpireChatLinkTask;
use App\Task\LiveMonitorTask;
use App\Task\SyncArticleTask;
use App\Task\SyncMatchNormalTask;
use App\Task\SyncCompleteMatchInfoTask;
use App\Task\SyncMatchListTask;
use App\Task\SyncMatchStatsTask;
use App\Task\VirtualAnchorLiveTask;
use App\Task\TestAutoReleaseScheme;
use App\Task\UpdateRedbillProject;
use Hyperf\Crontab\Schedule;

Schedule::call([SyncMatchListTask::class, 'execute'])->setName('sync-match-list')->setRule('*/10 * * * *')->setMemo('更新赛程列表')->setSingleton(true);
Schedule::call([SyncMatchNormalTask::class, 'execute'])->setName('sync-abnormal-match')->setRule('*/5 * * * *')->setMemo('更新状态异常的比赛')->setSingleton(true);
Schedule::call([SyncCompleteMatchInfoTask::class, 'execute'])->setName('sync-complete-match')->setRule('*/10 * * * *')->setMemo('更新已完成的比赛后续数据')->setSingleton(true);
Schedule::call([SyncMatchStatsTask::class, 'execute'])->setName('sync-playing-match')->setRule('*/3 * * * *')->setMemo('更新比赛中的各项实时数据')->setSingleton(true);
Schedule::call([SyncMatchNormalTask::class, 'execute'])->setName('sync-match-normal')->setRule('*/10 * * * *')->setMemo('更新比赛常规信息')->setSingleton(true);
Schedule::call([UpdateRedbillProject::class, 'execute'])->setName('update-redbill-project')->setRule('* * * * *')->setMemo('结算爆料项目')->setSingleton(true);
Schedule::call([ClearExpireChatLinkTask::class, 'execute'])->setName('clear-expire-link')->setRule('* * * * *')->setMemo('清理聊天室异常连接')->setSingleton(true);
Schedule::call([SyncArticleTask::class, 'execute'])->setName('sync-article')->setRule('0 * * * *')->setMemo('同步文章')->setSingleton(true);
Schedule::call([LiveMonitorTask::class, 'execute'])->setName('live-monitor')->setRule('*/5 * * * * *')->setMemo('直播监测')->setSingleton(true);
Schedule::call([VirtualAnchorLiveTask::class, 'execute'])->setName('virtual-anchor-live')->setRule('* * * * *')->setMemo('虚拟主播自动开播')->setSingleton(true);
Schedule::call([CalcRedbillRankingTask::class, 'execute'])->setName('calc-redbill-ranking')->setRule('5 0 * * *')->setMemo('专家排行数据计算')->setSingleton(true);

//测试
Schedule::call([TestAutoReleaseScheme::class, 'execute'])->setName('test-auth-release-scheme')->setRule('* 6-24 * * *')->setMemo('测试-自动发布方案')->setSingleton(true);
